<?php
	class ringtoneUndoCheckOutAction extends sfActions {
		public function execute(){
			$ringtoneId = $this->getRequestParameter("ringtoneId");

			$retVal = new stdClass();
			$retVal->success = true;
	
			$cr = new Criteria();
			$cr->add(RingtonePeer::ID, $ringtoneId);
			$_ringtoneCheckOut = RingtonePeer::doSelectOne($cr);
	
			if ($_ringtoneCheckOut)
			{
				$_ringtoneCheckOut->setAdminCheckoutId(null);
				$_ringtoneCheckOut->save();
			}
			echo FastJSON::encode($retVal);
			exit();
		}
	}
?>